<?php
//debug data : dsm($dt_data)
// dsm($dt_data);
//giữ lại cấu trúc của tpl, các class vs name
?>
<div class="shop-filter-select">
	<select class="shop-filter-status" name="shop-filter-status">
		<?php
			$option = array(
				'default' => 'Mặc định',
				'new' => 'Mới nhất',
				'low' => 'Giá thấp trước',
				'height' => 'Giá cao trước'
			);
			foreach($option as $key => $name) {
				if($key == $dt_data['filter']['status']) {
					print '<option value="'.$key.'" selected>'.$name.'</option>';
				} else {
					print '<option value="'.$key.'">'.$name.'</option>';
				}
			}
		?>

	</select>
	<select class="shop-filter-items" name="shop-filter-items">
	<?php
		$option = array(
			'default' => 'Mặc định',
			'15' => '15 sp',
			'25' => '25 sp',
			'40' => '40 sp',
			'100' => '100 sp'
		);
		foreach($option as $key => $name) {
			if($key == $dt_data['filter']['items']) {
				print '<option value="'.$key.'" selected>'.$name.'</option>';
			} else {
				print '<option value="'.$key.'">'.$name.'</option>';
			}
		}
	?>
	</select>
	<span class="grid-filter">
    <a href="#" class="compare shop-filter-display">Hiển thị</a>
  </span>
	<span class="grid-filter shop-filter-view">
		Kiểu xem:
		<?php
			$option = array(
				'grid' => '<i class="fa fa-th-large"></i>x1',
				'list' => '<i class="fa fa-list"></i> x2',
			);
			foreach($option as $key => $name) {
				if($key == $dt_data['filter']['views']) {
					print '<a href="#"  data-view="'.$key.'"  class="active">'.$name.'</a>';
				} else {
					print '<a href="#"  data-view="'.$key.'" >'.$name.'</a>';
				}
			}
		?>
	</span>
</div>

<?php
	if(count($dt_data['data']) != 0) {
		foreach($dt_data['data'] as $key => $item) {
      $imgs = $item['field_shop_images'];
      print '<h4>'.render($imgs).'</h4>';
		}
	}

	if(count($dt_data['pager']) != 0) {
			print $dt_data['pager'];
	}
?>
